<?php

class ApiModule extends CWebModule {

    public $sig = 'mobi03258555';

    public function init() {
        $this->setImport(array(
//			'models.*',
//			'Review.components.*',
        ));
    }

    public function beforeControllerAction($controller, $action) {
        if (parent::beforeControllerAction($controller, $action)) {
            
            return true;
        } else
            return false;
    }

    function checkSignature() {
        $headers = getallheaders();
        return isset($headers['signature']) && $headers['signature'] == md5($this->sig) ? true : false;
    }

}
